Optimal. Leaf size=32 \[ a^2 \log (x)+\frac{2 a b x^n}{n}+\frac{b^2 x^{2 n}}{2 n} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.0434729, antiderivative size = 32, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154 \[ a^2 \log (x)+\frac{2 a b x^n}{n}+\frac{b^2 x^{2 n}}{2 n} \]
Antiderivative was successfully verified.
[In] Int[(a + b*x^n)^2/x,x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [F] time = 0., size = 0, normalized size = 0. \[ \frac{a^{2} \log{\left (x^{n} \right )}}{n} + \frac{2 a b x^{n}}{n} + \frac{b^{2} \int ^{x^{n}} x\, dx}{n} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((a+b*x**n)**2/x,x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.0277067, size = 27, normalized size = 0.84 \[ a^2 \log (x)+\frac{b x^n \left (4 a+b x^n\right )}{2 n} \]
Antiderivative was successfully verified.
[In] Integrate[(a + b*x^n)^2/x,x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.003, size = 36, normalized size = 1.1 \[{\frac{ \left ({x}^{n} \right ) ^{2}{b}^{2}}{2\,n}}+2\,{\frac{ab{x}^{n}}{n}}+{\frac{{a}^{2}\ln \left ({x}^{n} \right ) }{n}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((a+b*x^n)^2/x,x)
[Out]
_______________________________________________________________________________________
Maxima [A] time = 1.44274, size = 46, normalized size = 1.44 \[ \frac{a^{2} \log \left (x^{n}\right )}{n} + \frac{b^{2} x^{2 \, n} + 4 \, a b x^{n}}{2 \, n} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((b*x^n + a)^2/x,x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.238836, size = 41, normalized size = 1.28 \[ \frac{2 \, a^{2} n \log \left (x\right ) + b^{2} x^{2 \, n} + 4 \, a b x^{n}}{2 \, n} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((b*x^n + a)^2/x,x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 0.71041, size = 36, normalized size = 1.12 \[ \begin{cases} a^{2} \log{\left (x \right )} + \frac{2 a b x^{n}}{n} + \frac{b^{2} x^{2 n}}{2 n} & \text{for}\: n \neq 0 \\\left (a + b\right )^{2} \log{\left (x \right )} & \text{otherwise} \end{cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((a+b*x**n)**2/x,x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [F] time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (b x^{n} + a\right )}^{2}}{x}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((b*x^n + a)^2/x,x, algorithm="giac")
[Out]